import Rest from './request'
import type { Worknum } from '@/types/worknum'
import type { Eachts } from '@/types/Eachts'
import type { WorkData } from '@/types/WorkData'

export function getworknum() {
    return Rest.get<Worknum>('/worknum')
}
//获取echarts数据
export function getecharts() {
    return Rest.get<Eachts>('/echarts')
}
//获取naveash
export function getnav() {
    return Rest.get<any>('/naveash')
}
//获取工作台表格
export function getworktable(searchtitle: string, searchstr: string, page: number, limit: number) {
    return Rest.get<WorkData[]>(`/workdata?_page=${page}&_limit=${limit}&${searchtitle}_like=${searchstr}`)
}
//删除工作台表格
export function delworktable(id: number) {
    return Rest.delete<WorkData>(`/workdata/${id}`)
}